package global

import "runtime"

// Variables
var (
	Logger = NewCustomLogger()
)

// Constant
const (
	MaxBufferSize = 1024 * 1024 * 10 // 10MB
	CurrentOS     = runtime.GOOS     // OS
)

// Errors Messages
const (
	// 命令执行失败
	CommandFailed = "Command execution failed"
	// 请求伪终端失败
	RequestPseudoTerminalFailed = "Failed to request pseudo terminal"
	// 连接SSH服务器失败
	ConnectSSHServerFailed = "Failed to connect to the server"
	// 断开SSH连接失败
	DisconnectSSHFailed = "Failed to disconnect from the server"
	// 不能创建SSH会话
	CreateSSHSessionFailed = "Failed to create SSH session"
	// 不能执行命令
	ExecuteCommandFailed = "Failed to execute command"
	// 不能获取标准输出
	GetPipeoutFailed = "Failed to get standard output"
	// 不能获取错误输出
	GetPipeErrFailed = "Failed to get error output"
	// 不能获取扫描行
	GetScanLineFailed = "Failed to get scan line"
	// 找不到当前进程
	FindProcessFailed = "Failed to find process id"
	// SSH会话没有建立连接, 请先建立连接
	SSHSessionNotConnected = "SSH connection not established, please connect first"
	// SSH config删除失败
	SSHConfigDeleteError = "Failed to delete SSH config"
	// 发送信号失败
	SendSignalFailed = "Send signal failed"
	// 不支持的操作系统
	UnsupportedOS = "Unsupported OS"

	/********************************* share分享 **********************************/
	// 分享内容为空
	ShareContentEmpty = "Share content is empty"
	// 临时文件创建失败
	CreateTmpFileFailed = "Failed to create temporary file"
	// 不支持的分享命令方式
	UnsupportedShareCommand = "Unsupported share command"
	// 临时文件创建失败
	FailedToCreateTmpFile = "Failed to create temporary file"
)

// Normal messages
const (
	// 命令执行完成
	CommandCompleted = "Command execution completed"
	// 日志流已经停止
	LogStreamStopped = "Log stream stopped"
)

// Config file path
const (
	PwdUserSRPath = ".developer_tools"
)

// Configuration file
const (
	// Password Storage Path
	PwdUserName = "UsrPwd.json"
	ConfigPath  = "command.json"
)
